<html>
<head>
<title>ASP.NET Validation Controls</title>
<script language="javascript" 
        src="/js/WebUIValidation.js">
</script>
<!-- #include file="style.inc" -->
</head>
<body bgcolor="#ffffff">
<!--------------------------------------------------------------------------->
<span class="heading">ValidationSummary Control</span> &nbsp; &nbsp; &nbsp;
<form runat="server" action="getvalue.aspx" method="post">
 <table border="0">

<tr>
  <td valign="top">Email</td>
  <td><input type="text" id="txtEmail" 
	maxlength="50" size="20" runat="server" />
	<asp:RequiredFieldValidator 
	id="valRequired" runat="server"
          	 ControlToValidate="txtEmail"
          	 ErrorMessage="Email can not empty, 
		please enter your email."
          	 Display="dynamic">*         	 
      </asp:RequiredFieldValidator><br />	      
  </td>
 </tr>
<tr>
  <td valign="top">Fullname</td>
  <td><input type="text" id="txtfullname" 
	maxlength="50" size="20" runat="server" />
	<asp:RequiredFieldValidator 
	id="valCompare" runat="server"
          	 ControlToValidate="txtfullname"
          	 ErrorMessage="Fullname can not empty, 
		please enter your fullname."
          	 Display="dynamic">*
      </asp:RequiredFieldValidator><br />	      
  </td>
 </tr>
 </table>

<asp:ValidationSummary id="valSummary" runat="server"
     HeaderText="<b>The following errors were found:</b>"
     ShowSummary="True" 
     DisplayMode="List"/>

<hr />
<input type="submit" id="cmdConfirm" value="Submit" runat="server" >&nbsp; &nbsp;
<input type="reset" id="cmdCancel" value="Cancel" runat="server" >&nbsp; &nbsp;
</form>
<script language="VB" runat="server">

Sub Page_Load()
  Dim objValidator As BaseValidator
  For Each objValidator In Page.Validators
    objValidator.Enabled = False
    objValidator.EnableClientScript=True
  Next
  valSummary.ShowMessageBox =True
End Sub


</script>
<!--------------------------------------------------------------------------->
<!-- #include file="foot.inc" -->
</body>
</html>

